// "Copyright [2021] <Copyright Shengkai Lin>"

#ifndef ROUTING_ROUTE_H_
#define ROUTING_ROUTE_H_

#include "ai_sim.h"
#include "network_controller/topology.h"
#include "network_controller/topo_manager.h"

namespace ai_sim {

class RouteAlgorithm {
 public:
    virtual void generateRoutes(taskboard&, TopoManager *) = 0;
    bool selectInMachine(omnetpp::cModule*, void*);
    static RouteAlgorithm* get(ClusterType type);
    virtual ~RouteAlgorithm(){}
};

class OxcClusterRouteAlgorithm : public RouteAlgorithm {
 public:
    void generateRoutes(taskboard&, TopoManager * topos);
 private:
    bool isOxcLink(TopoManager* topos,
      const Topology::LinkOut*, Topology& oxc_topo);
};

class RoceClusterRouteAlgorithm : public RouteAlgorithm {
 public:
    void generateRoutes(taskboard&, TopoManager * topos);
};

class IBClusterRouteAlgorithm : public RouteAlgorithm {
 public:
    void generateRoutes(taskboard&, TopoManager * topos);
};
}  // namespace ai_sim
#endif  // ROUTING_ROUTE_H_